package com.gnrsoft.springcloud.service.feign.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.gnrsoft.springcloud.service.feign.service.SchedualServiceHi;

@RestController
public class HiController {

    @Autowired
    SchedualServiceHi schedualServiceHi;
    
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String sayHi(@RequestParam String name){
    	//http://localhost:8765/hi?name=feignTest
    	System.out.println("feign");
        return schedualServiceHi.sayHiFromClientOne(name);
    }
    
	@RequestMapping(value = "/hello")
	public String hello() {
		System.out.println("say hello");
		return "hello";
	}
}
